<template>
  <div>
    <a-card :bordered="false">
      <f-table ref="table" rowKey="reportOutfiveId" :columns="columns" :multiple="false"
               :scroll="{x:newColumns.length*150,y:newColumns.length*35}" :operator="operator" :params="queryParam" :api="api.report5">
      </f-table>
    </a-card>
  </div>
</template>
<script>
  import api from './js/api'

  export default {
    name: 'reportOut5Detail',
    components: {},
    data() {
      let me = this
      //操作按钮
      let operator = []
      return {
        api: Object.assign(api, this.api),
        //列表初始化查询参数
        queryParam: {},
        // 表头
        columns: [
          {
            title: '序号',
            width: '60',
            align: 'center',
            customRender: (text, record, index) => index + 1
          },
          {
            title: '备用',
            width: '60',
            align: 'center',
            dataIndex: 'Field1'
          },
          {
            title: '项目编号',
            align: 'center',
            dataIndex: 'repotItem'
          },
          {
            title: '项目名称&描述',
            align: 'center',
            dataIndex: 'projectDesc'
          },
          {
            title: '单位',
            align: 'center',
            dataIndex: 'itemunit'
          },
          {
            title: '数量',
            align: 'center',
            dataIndex: 'quantity'
          },
          {
            title: '单价Rate',
            align: 'center',
            dataIndex: '',
            children: [
              {
                title: '供应',
                align: 'center',
                width: 150,
                dataIndex: 'supplyPrice'
              },
              {
                title: '安装',
                align: 'center',
                width: 150,
                dataIndex: 'installPrice'
              }
            ]

          },
          {
            title: '合计',
            align: 'center',
            dataIndex: 'synthesizeAmount'
          },
          {
            title: '备注',
            align: 'center',
            dataIndex: 'remark'
          },
          {
            title: '分包申请产值',
            align: 'center',
            dataIndex: '',
            children: [
              {
                title: '累计',
                align: 'center',
                width: 150,
                dataIndex: '',
                children: [
                  {
                    title: '数量',
                    align: 'center',
                    width: 150,
                    dataIndex: 'accumulativeCount'

                  },
                  {
                    title: '合计',
                    align: 'center',
                    width: 150,
                    dataIndex: 'accumulativeAmount'
                  }
                ]
              }
            ]
          },
          {
            title: '联实审核产值',
            align: 'center',
            dataIndex: '',
            children: [
              {
                title: 'Accumulative累计',
                align: 'center',
                dataIndex: '',
                children: [
                  {
                    title: '数量',
                    align: 'center',
                    width: 150,
                    dataIndex: 'reviewedCount'

                  },
                  {
                    title: '合计',
                    align: 'center',
                    width: 150,
                    dataIndex: 'reviewedAmount'
                  },
                  {
                    title: '完成比例',
                    align: 'center',
                    width: 150,
                    dataIndex: 'reviewedCent'
                  }
                ]

              },
              {
                title: '截止目前完成产值',
                align: 'center',
                dataIndex: '',
                children: [
                  {
                    title: '数量',
                    align: 'center',
                    width: 150,
                    dataIndex: 'refCount'

                  },
                  {
                    title: '合计',
                    align: 'center',
                    width: 150,
                    dataIndex: 'refAmount'
                  },
                  {
                    title: '完成比例',
                    align: 'center',
                    width: 150,
                    dataIndex: 'refCent'
                  }
                ]
              }
            ]
          },
          {
            title: 'Previously Approved 之前批准产值',
            align: 'center',
            dataIndex: '',
            colSpan: 0,
            children: [
              {
                title: 'Qty数量',
                align: 'center',
                width: 150,
                dataIndex: 'approvalCount'
              },
              {
                title: 'TotalPrice合计 ',
                align: 'center',
                width: 150,
                dataIndex: 'approvalTotalPrice'

              }
            ]
          },
          {
            title: '年月',
            align: 'center',
            dataIndex: 'reportMonth',
            width: 150
          },
          {
            title: '批次',
            align: 'center',
            dataIndex: 'batchNumber',
            width: 100
          }
        ],
        operator: operator
      }
    },
    created() {
      this.queryParam.projectCode = this.$route.query.projectCode
      this.queryParam.reportMonth = this.$route.query.reportMonth
      this.queryParam.batchNumber = this.$route.query.batchNumber
    },
    methods: {}
  }
</script>
